

var transforms = function(){

	this.popOut = function(x, p, m){
		var b = (x <= m) ? (p-1)/(m*m) : p/((1-m)*(1-m));
		return p - b*(x-m)*(x-m);
	};

	this.popIn = function(x, p, m){
		var b = (x <= m) ? p/(m*m) : (p-1)/((1-m)*(1-m));
		return p - b*(x-m)*(x-m);
	};

	this.popInOrOut = function(x, p, m, D){
		var K = (x <= m) ? 1 : 0;
		var b = (p-D)/((K-1-m)*(K-1-m));
		return p - b*(x-m)*(x-m);
	};

	this.expEaseIn = function(p){
		return 1.28*Math.atan(p);
	};

	this.easeIn = function(p){
		return Math.pow(p,.4);
	};

	this.pulseIn = function(p,oscil,size){
		//return 1 + eval(.05*Math.cos(Math.pow(2,oscil)*Math.PI*p));
		return 1 + eval(size*Math.cos(Math.pow(2,oscil)*Math.PI*p));
	};
	this.pulseOut = function(p,oscil,size){
		//return 1 + eval(.05*Math.sin(Math.pow(2,oscil)*Math.PI*p));
		return 1 + eval(size*Math.sin(Math.pow(2,oscil)*Math.PI*p));
	};
	this.wiggle = function(p,oscil){
		//return 1 + eval(.2*Math.cos(Math.pow(2,oscil)*Math.PI*p));
		return .8 + eval(.2*Math.cos(Math.pow(2,oscil)*Math.PI*p));
	};


	this.springY = function(p,oscil){
		return p;
	};
    
	this.popInOut = function(p){
		return (p<0.5) ? this.popIn(p*2): this.popOut((p-.5)*2);
	};


}
